import scrapy


class DangdangSpider(scrapy.Spider):
    name = "dangdang"
    start_urls = ["http://search.dangdang.com/?key=python&act=input"]

    def parse(self, response):
        filename = "pyBooks.html"
        open(filename, 'w').write(response.body)
        print(response.body)
